package com.auxgroup.smarthome.enterprise.bean;

import java.util.Calendar;
import java.util.LinkedHashMap;

/**
 * Created by lixiaoxiao on 17-9-13.
 * 睡眠diy缓存实体
 */
public class AppSleepDiyCacheInfo{
    private int startHour;
    private int startMinute;
    private String productKey;
    private String did;
    private LinkedHashMap<String,String> map;
    private int mode;
    private String sleepDiyId;

    public AppSleepDiyCacheInfo() {
    }

    public AppSleepDiyCacheInfo(int startHour, int startMinute, String productKey, String did, LinkedHashMap<String, String> map, int mode, String sleepDiyId) {
        this.startHour = startHour;
        this.startMinute = startMinute;
        this.productKey = productKey;
        this.did = did;
        this.map = map;
        this.mode = mode;
        this.sleepDiyId = sleepDiyId;
    }

    /**
     * 是否满足设置时间
     * @return true:满足  false:不满足
     */
    public boolean atTime(){
        int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
        int minute = Calendar.getInstance().get(Calendar.MINUTE);
        return startHour == hour && startMinute == minute;
    }

    public int getStartHour() {
        return startHour;
    }

    public void setStartHour(int startHour) {
        this.startHour = startHour;
    }

    public int getStartMinute() {
        return startMinute;
    }

    public void setStartMinute(int startMinute) {
        this.startMinute = startMinute;
    }

    public LinkedHashMap<String, String> getMap() {
        return map;
    }

    public void setMap(LinkedHashMap<String, String> map) {
        this.map = map;
    }

    public String getProductKey() {
        return productKey;
    }

    public void setProductKey(String productKey) {
        this.productKey = productKey;
    }

    public String getDid() {
        return did;
    }

    public void setDid(String did) {
        this.did = did;
    }

    public int getMode() {
        return mode;
    }

    public void setMode(int mode) {
        this.mode = mode;
    }

    public String getSleepDiyId() {
        return sleepDiyId;
    }

    public void setSleepDiyId(String sleepDiyId) {
        this.sleepDiyId = sleepDiyId;
    }
}
